#ifndef PB_APPLICATION_H_
#define PB_APPLICATION_H_

namespace pb
{
class Application
{
private:
    HWND m_hwnd;
    CComPtr<ID2D1Factory> m_pD2DFactory;
    CComPtr<IDWriteFactory> m_pDWriteFactory;
    CComPtr<ID2D1HwndRenderTarget> m_pRenderTarget;
    CComPtr<IDWriteTextFormat> m_pTextFormatLarge;
    CComPtr<IDWriteTextLayout> m_pTextLayoutLarge;
    CComPtr<IDWriteTextFormat> m_pTextFormatSmall;
    CComPtr<ID2D1SolidColorBrush> m_pWhiteBrush;

public:
    Application();
    virtual ~Application();
    HRESULT Initialize();
    void RunMessageLoop();
    HRESULT CreateDeviceIndependentResources();
    HRESULT CreateDeviceResources();
    void DiscardDeviceResources();
    HRESULT OnRender();
    void OnResize(UINT width, UINT height);
    void OnDropFiles(HDROP hDrop);
    static LRESULT CALLBACK WndProc(
        HWND hWnd,
        UINT message,
        WPARAM wParam,
        LPARAM lParam);

};
}

#endif // PB_APPLICATION_H_